Skip to content

Rollup of 10 pull requests #139525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Apr 8, 2025
Merged

Rollup of 10 pull requests #139525

merged 31 commits into from
Apr 8, 2025

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Apr 8, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

xtexx and others added 30 commits April 3, 2025 17:35
Fixes rust-lang#139082.

Emits an error when `Self` is found in the projection bounds of a trait
object. In type aliases, `Self` has no meaning, so `type A = &'static
dyn B` where `trait B = Fn() -> Self` will expands to `type A = &'static
Fn() -> Self` which is illegal, causing the region solver to bail out
when hitting the uninferred Self.

Bug: rust-lang#139082
Signed-off-by: xtex <xtexchooser@duck.com>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This can happen when invalid syntax is passed to a declarative macro. We
shouldn't be too strict about the token stream position once the parser
has rejected the invalid syntax.

Fixes rust-lang#139248.
Fixes rust-lang#139445.

The additional errors aren't great but the first one is still good and
it's the most important, and imperfect errors are better than ICEing.
…ounds, r=lcnr

Implement overflow for infinite implied lifetime bounds

Not a great error message, but better than a hang

Fixes rust-lang#138665
Fixes rust-lang#102966
Fixes rust-lang#115407

r? lcnr
…e-err, r=lcnr

Make error message for missing fields with `..` and without `..` more consistent

When `..` is not present, we say "missing field `bar` in initializer", but when it is present we say "missing mandatory field `bar`". I don't see why the primary error message should change, b/c the root cause is the same.

Let's harmonize these error messages and instead use a label to explain that `..` is required b/c it's not defaulted.

r? estebank
…=WaffleLapkin

Tell LLVM about impossible niche tags

I was trying to find a better way of emitting discriminant calculations, but sadly had no luck.

So here's a fairly small PR with the bits that did seem worth bothering:

1. As the [`TagEncoding::Niche` docs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_abi/enum.TagEncoding.html#variant.Niche) describe, it's possible to end up with a dead value in the input that's not already communicated via the range parameter attribute nor the range load metadata attribute.  So this adds an `llvm.assume` in non-debug mode to tell LLVM about that.  (That way it can tell that the sides of the `select` have disjoint possible values.)

2. I'd written a bunch more tests, or at least made them parameterized, in the process of trying things out, so this checks in those tests to hopefully help future people not trip on the same weird edge cases, like when the tag type is `i8` but yet there's still a variant index and discriminant of `258` which doesn't fit in that tag type because the enum is really weird.
…er-errors

compiler: report error when trait object type param reference self

Fixes rust-lang#139082.

Emits an error when `Self` is found in the projection bounds of a trait
object. In type aliases, `Self` has no meaning, so `type A = &'static
dyn B` where `trait B = Fn() -> Self` will expands to `type A = &'static
Fn() -> Self` which is illegal, causing the region solver to bail out
when hitting the uninferred Self.

r? ````@compiler-errors```` ````@fee1-dead````
…riddle,lolbinarycat,yotamofek

Update to new rinja version (askama)

Askama maintenance was handed over to rinja maintainers so new `rinja` release is actually `askama`. More information [here](https://blog.guillaume-gomez.fr/articles/2025-03-19+Askama+and+Rinja+merge).

r? ``@notriddle``
…r-diag-hir-wf-check, r=oli-obk

Don't construct preds w escaping bound vars in `diagnostic_hir_wf_check`

See comment inline.

Fixes rust-lang#139330

r? oli-obk
…t-libtest, r=jieyouxu,kobzol

make it possible to use stage0 libtest on compiletest

With rust-lang#119899, building the library tree will require a stage 1 compiler. This is because `compiletest` is defined as a `ToolStd` (since rust-lang#68019) in order to use the in-tree library. As a result, rust-lang#119899 makes certain development workflows more difficult as changes on the compiler tree will now require recompiling `compiletest` each time.

This PR allows switching `ToolStd` to `ToolBootstrap` with a simple boolean option in `bootstrap.toml` to allow `compiletest` to use the stage 0 `libtest` instead.

The changes under `src/ci` are clearly intended to make sure that `compiletest` doesn't break during future bootstrap beta bumps.
…l-with-proj, r=oli-obk

Fix trait upcasting to dyn type with no principal when there are projections

rust-lang#126660 (which I had originally authored, lol) had a subtle bug that is the moral equivalent of rust-lang#114036, which is that when upcasting from `dyn Principal<Projection = Ty> + AutoTrait` to `dyn AutoTrait`, we were dropping the trait ref for `Principal` but not its projections (if there were any).

With debug assertions enabled, this triggers the assertion I luckily added in a2a0cfe, but even without debug assertions this is a logical bug since we had a dyn type with just a projection bound but no principal, so it caused a type mismatch.

This does not need an FCP because this should've been covered by the FCP in rust-lang#126660, but we just weren't testing a case when casting from a `dyn` type with projections 😸

Fixes rust-lang#139418

r? ````@oli-obk```` (or anyone)
…445, r=petrochenkov

Allow for reparsing failure when reparsing a pasted metavar.

Fix some metavar reparsing issues.

Fixes rust-lang#139248 and rust-lang#139445.

r? `@petrochenkov`
… r=oli-obk

Update some comment/docs related to "extern intrinsic" removal

Follow-up to rust-lang#139455.

r? `@oli-obk`
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels Apr 8, 2025
@Zalathar
Copy link
Contributor Author

Zalathar commented Apr 8, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 8, 2025

📌 Commit 42fdd7d has been approved by Zalathar

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 8, 2025
@bors
Copy link
Collaborator

bors commented Apr 8, 2025

⌛ Testing commit 42fdd7d with merge f820b75...

@bors
Copy link
Collaborator

bors commented Apr 8, 2025

☀️ Test successful - checks-actions
Approved by: Zalathar
Pushing f820b75 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 8, 2025
@bors bors merged commit f820b75 into rust-lang:master Apr 8, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 8, 2025
Copy link

github-actions bot commented Apr 8, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing e5fefc3 (parent) -> f820b75 (this PR)

Test differences

Show 33087 test diffs

Stage 1

  • coverage::counters::union_find::tests::transitive: [missing] -> pass (J0)
  • doctest::tests::make_test_with_main: [missing] -> pass (J0)
  • error::verify_middle_layout_too_generic_10: [missing] -> pass (J0)
  • errors::verify_parse_binder_and_polarity_164: [missing] -> pass (J0)
  • errors::verify_passes_doc_alias_not_an_alias_25: [missing] -> pass (J0)
  • session_diagnostics::verify_attr_parsing_missing_since_3: [missing] -> pass (J0)
  • spec::tests::aarch64_apple_tvos_sim: [missing] -> pass (J0)
  • spec::tests::armv5te_unknown_linux_uclibceabi: [missing] -> pass (J0)
  • spec::tests::riscv32imafc_esp_espidf: [missing] -> pass (J0)
  • spec::tests::thumbv8m_main_none_eabihf: [missing] -> pass (J0)
  • ascii::short::is_ascii_uppercase: [missing] -> pass (J1)
  • num::flt2dec::strategy::grisu::bench_small_exact_12: [missing] -> pass (J1)
  • sort::tests::stable::self_cmp_cell_i32_ascending: [missing] -> pass (J1)
  • sort::tests::unstable::deterministic_string_random_s95: [missing] -> pass (J1)
  • sort::tests::unstable::self_cmp_i32_random_s95: [missing] -> pass (J1)
  • str::ends_with_ascii_char::short_ascii: [missing] -> pass (J1)
  • str::starts_with_str::short_mixed: [missing] -> pass (J1)
  • tests::test_should_not_report_time: [missing] -> pass (J1)
  • vec::bench_clone_from_01_0010_0000: [missing] -> pass (J1)
  • vec_deque::bench_from_array_1000: [missing] -> pass (J1)
  • array::array_map: [missing] -> pass (J2)
  • cell::cell_has_sensible_show: [missing] -> pass (J2)
  • collections::binary_heap::test_into_iter_size_hint: [missing] -> pass (J2)
  • collections::btree::map::tests::test_extract_if::height_0_removing_one: [missing] -> pass (J2)
  • collections::btree::map::tests::test_range_finding_ill_order_in_range_ord: [missing] -> pass (J2)
  • collections::btree::map::tests::test_range_height_1: [missing] -> pass (J2)
  • collections::hash::map::tests::test_vacant_entry_key: [missing] -> pass (J2)
  • into_boxed: [missing] -> pass (J2)
  • io::error::tests::test_os_packing: [missing] -> pass (J2)
  • lazy::aliasing_in_get: [missing] -> pass (J2)
  • mpsc::test_nested_recv_iter: [missing] -> pass (J2)
  • nonzero::test_match_nonzero_const_pattern: [missing] -> pass (J2)
  • num::bignum::test_mul_digits_overflow_1: [missing] -> pass (J2)
  • num::i32::test_arith_operation: [missing] -> pass (J2)
  • num::ops::test_bitand_assign_defined: [missing] -> pass (J2)
  • num::test_try_u16isize: [missing] -> pass (J2)
  • num::u32::test_is_next_multiple_of: [missing] -> pass (J2)
  • num::u32::test_isolate_most_significant_one: [missing] -> pass (J2)
  • rc::test_live: [missing] -> pass (J2)
  • rc::test_unique_rc_unsizing_coercion: [missing] -> pass (J2)
  • reentrant_lock::trylock_works: [missing] -> pass (J2)
  • slice::split_off_mut_oob_range_to: [missing] -> pass (J2)
  • slice::test_array_windows_infer: [missing] -> pass (J2)
  • slice::test_rchunks_exact_remainder: [missing] -> pass (J2)
  • str::slice_index::boundary::rangefrom::pass: [missing] -> pass (J2)
  • str::slice_index::rangefrom_len::index_fail: [missing] -> pass (J2)
  • str::test_total_ord: [missing] -> pass (J2)
  • vec::test_vec_cycle: [missing] -> pass (J2)
  • vec_deque::test_ord: [missing] -> pass (J2)
  • vec_deque::test_partition_point: [missing] -> pass (J2)
  • sort::tests::stable::stability_i32_random_d20: [missing] -> ignore (J3)

Stage 2

  • doctest::tests::make_test_no_crate_inject: pass -> [missing] (J0)
  • errors::verify_ast_lowering_clobber_abi_not_supported_12: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_extract_bundled_libs_write_file_75: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_stripping_debug_info_failed_58: pass -> [missing] (J0)
  • errors::verify_const_eval_unallowed_inline_asm_22: pass -> [missing] (J0)
  • errors::verify_const_eval_unmarked_intrinsic_exposed_14: pass -> [missing] (J0)
  • errors::verify_parse_invalid_literal_suffix_on_tuple_index_35: pass -> [missing] (J0)
  • errors::verify_parse_pattern_method_param_without_body_48: pass -> [missing] (J0)
  • errors::verify_passes_attr_application_struct_147: pass -> [missing] (J0)
  • errors::verify_passes_break_inside_closure_128: pass -> [missing] (J0)
  • errors::verify_passes_naked_asm_outside_naked_fn_137: pass -> [missing] (J0)
  • errors::verify_resolve_expected_module_found_18: pass -> [missing] (J0)
  • errors::verify_resolve_indeterminate_19: pass -> [missing] (J0)
  • graph::scc::tests::test_simple_cycle_max: pass -> [missing] (J0)
  • json::tests::bom: pass -> [missing] (J0)
  • sorted_map::tests::test_remove: pass -> [missing] (J0)
  • spec::tests::powerpc_wrs_vxworks: pass -> [missing] (J0)
  • spec::tests::thumbv7neon_unknown_linux_musleabihf: pass -> [missing] (J0)
  • num::u128::test_lots_of_isqrt: pass -> [missing] (J1)
  • slice::swap_with_slice_5x_usize_30: pass -> [missing] (J1)
  • sort::tests::stable::stability_i32_descending: pass -> [missing] (J1)
  • str::trim_end_ascii_char::short_mixed: pass -> [missing] (J1)
  • tests::test_should_panic_non_string_message_type: pass -> [missing] (J1)
  • boxed::box_clone_and_clone_from_equivalence: pass -> [missing] (J2)
  • char::test_escape_unicode: pass -> [missing] (J2)
  • collections::btree::map::tests::test_check_invariants_ord_chaos: pass -> [missing] (J2)
  • collections::linked_list::tests::drain_to_empty_test: pass -> [missing] (J2)
  • f32::test_neg_zero: pass -> [missing] (J2)
  • f64::test_log: pass -> [missing] (J2)
  • f64::test_num_f64: pass -> [missing] (J2)
  • fmt::builders::debug_set::test_single: pass -> [missing] (J2)
  • hash::sip::test_siphash_1_3: pass -> [missing] (J2)
  • instant_math_is_associative: pass -> [missing] (J2)
  • io::copy::tests::copy_copies: pass -> [missing] (J2)
  • iter::adapters::zip::test_zip_nth_back_side_effects: pass -> [missing] (J2)
  • num::dec2flt::lemire::compute_float_f64_rounding: pass -> [missing] (J2)
  • num::i16::test_div_floor: pass -> [missing] (J2)
  • num::i32::test_div_ceil: pass -> [missing] (J2)
  • num::ops::test_rem_assign_defined: pass -> [missing] (J2)
  • num::test_try_isizei128: pass -> [missing] (J2)
  • num::test_try_isizei64: pass -> [missing] (J2)
  • num::u32::test_reverse_bits: pass -> [missing] (J2)
  • rwlock::test_get_cloned: pass -> [missing] (J2)
  • sort::tests::unstable::violate_ord_retain_orig_set_cell_i32_random_z1: pass -> [missing] (J2)
  • string::test_push: pass -> [missing] (J2)
  • string::test_split_off_empty: pass -> [missing] (J2)
  • thread::tests::test_park_timeout_unpark_called_other_thread: pass -> [missing] (J2)
  • num::flt2dec::strategy::grisu::exact_sanity_test: ignore -> [missing] (J3)
  • sort::tests::unstable::deterministic_i32_saw_mixed: ignore -> [missing] (J3)

(and 16418 additional test diffs)

Additionally, 16569 doctest diffs were found. These are ignored, as they are noisy.

Job group index

  • J0: aarch64-apple, x86_64-apple-1
  • J1: aarch64-apple, test-various, x86_64-apple-1
  • J2: aarch64-apple, test-various, x86_64-apple-1, x86_64-gnu-aux
  • J3: x86_64-gnu-aux

Job duration changes

  1. x86_64-apple-2: 1502.2s -> 7537.7s (401.8%)
  2. test-various: 2293.6s -> 4375.3s (90.8%)
  3. x86_64-apple-1: 6270.1s -> 10822.6s (72.6%)
  4. dist-x86_64-apple: 8217.1s -> 13012.8s (58.4%)
  5. x86_64-gnu-aux: 4188.5s -> 6044.5s (44.3%)
  6. aarch64-apple: 3026.2s -> 3884.8s (28.4%)
  7. dist-arm-linux: 5452.5s -> 5755.6s (5.6%)
  8. dist-i686-msvc: 6891.8s -> 7239.9s (5.1%)
  9. dist-i586-gnu-i586-i686-musl: 5189.5s -> 5407.1s (4.2%)
  10. x86_64-mingw-1: 9023.4s -> 9371.4s (3.9%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#138676 Implement overflow for infinite implied lifetime bounds a89875f782ce5d1abe3d2f7421c0c2ffc97668da (link)
#139024 Make error message for missing fields with .. and without… 7ebfd38b4ba6fb625dab573659657e664408cb28 (link)
#139098 Tell LLVM about impossible niche tags 5c0f459c0babee44921ac640a1e660e50a45a618 (link)
#139124 compiler: report error when trait object type param referen… 744d3f4fcf60bebf1ceabacd7b3f65f87d052bfe (link)
#139321 Update to new rinja version (askama) 85f829cf680c006d4fd0d5e6aa8f7c86a4cfb592 (link)
#139346 Don't construct preds w escaping bound vars in `diagnostic_… 730388a60f2be1a46afa0160c11a62e8abd07d75 (link)
#139386 make it possible to use stage0 libtest on compiletest 7e9136321407f78562d940dd887c2e5420e38019 (link)
#139421 Fix trait upcasting to dyn type with no principal when ther… e4e199d47a358082c7e5998ddf34dbca6e9e5acc (link)
#139464 Allow for reparsing failure when reparsing a pasted metavar. fecd1e5cbb88df66ae1121469dbdec4052765e71 (link)
#139490 Update some comment/docs related to "extern intrinsic" remo… 86d18de828442ab0190f6cb5a6108963c9909f5c (link)

previous master: e5fefc359b

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f820b75): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.7% [0.8%, 2.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.0%, secondary 3.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.1% [3.1%, 3.1%] 1
Improvements ✅
(primary)
-1.0% [-1.0%, -1.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.0% [-1.0%, -1.0%] 1

Cycles

Results (secondary 2.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

Results (primary 0.2%, secondary 0.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.2% [0.1%, 0.3%] 8
Regressions ❌
(secondary)
0.2% [0.2%, 0.3%] 38
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.7% [-1.4%, -0.4%] 5
All ❌✅ (primary) 0.2% [0.1%, 0.3%] 8

Bootstrap: 778.48s -> 778.798s (0.04%)
Artifact size: 365.93 MiB -> 366.02 MiB (0.02%)

@Zalathar Zalathar deleted the rollup-5t5xsrw branch April 8, 2025 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.